Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SteamOverHolland] fixes train discount bug #11169

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

philcampeau
Copy link
Collaborator

@philcampeau philcampeau commented Aug 22, 2024

Fixes #11163

Before clicking "Create"

  • Branch is derived from the latest master
  • Add the pins or archive_alpha_games label if this change will break existing games
  • Code passes linter with docker compose exec rack rubocop -a
  • Tests pass cleanly with docker compose exec rack rake

Implementation Notes

Explanation of Change

Changes the emergency_issuable_bundles method to read @depot.min_price(ability: nil) instead of @depot.min_depot_price

I had to remove a fixture file that broke as a result. Also, this will break any alpha games with this private, and possibly all of them.

Screenshots

Any Assumptions / Hacks

@philcampeau philcampeau added the archive_alpha_games Needs alpha games archiving label Aug 22, 2024
@philcampeau
Copy link
Collaborator Author

I've just submitted a new commit, which seems to resolve the issue, and shouldn't break any games.

Copy link
Collaborator

@ollybh ollybh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there might still be a potential bug lurking in here: part of the test at the start of Step::BuyTrain.must_sell_shares? is whether the corporation has more cash than the face value of the cheapest train. What happens if the corporation that owns the Werkspoor private has no train and between 90% and 100% the price of the cheapest train? Will they be able to sell shares, even though this isn't needed to buy the train.
You might need to change this test to use the Depot.min_price(corporation, ability) function.

@philcampeau philcampeau added the help wanted Extra attention is needed label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archive_alpha_games Needs alpha games archiving help wanted Extra attention is needed Steam Over Holland
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Steam over Holland] can only use p6 if full amount in treasury
2 participants